package loan.calc.exception;

public class GlobalException extends Exception implements BaseException{

    private final Integer code;

    private final String message ;


    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }

    public GlobalException(Integer code, String message) {
        super(message);
        this.code = code;
        this.message = message;
    }
    public GlobalException(Integer code, String format,Object... args) {
        super(String.format(format,args));
        this.code = code;
        this.message = String.format(format, args);
    }
}
